using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_PreeFeeMap : EntityTypeConfiguration<FMS_PreeFee>
	{
		public FMS_PreeFeeMap()
		{
			// Primary Key
			this.HasKey(t => t.ID);

			// Properties
			this.Property(t => t.ID)
				.HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
				
			this.Property(t => t.SubjectName)
				.HasMaxLength(100);
				
			this.Property(t => t.DepartmentName)
				.HasMaxLength(100);
				
			this.Property(t => t.Description)
				.HasMaxLength(200);
				
			// Table & Column Mappings
			this.ToTable("FMS_PreeFee");
			this.Property(t => t.ID).HasColumnName("ID");
			this.Property(t => t.UserID).HasColumnName("UserID");
			this.Property(t => t.SubjectName).HasColumnName("SubjectName");
			this.Property(t => t.DepartmentName).HasColumnName("DepartmentName");
			this.Property(t => t.FeeAmount).HasColumnName("FeeAmount");
			this.Property(t => t.StopDate).HasColumnName("StopDate");
			this.Property(t => t.Description).HasColumnName("Description");
			this.Property(t => t.CreateUser).HasColumnName("CreateUser");
			this.Property(t => t.UpdateUser).HasColumnName("UpdateUser");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.UpdateDeptId).HasColumnName("UpdateDeptId");
			this.Property(t => t.CreateDeptId).HasColumnName("CreateDeptId");
		}
	}
}

